package com.geostar.constructionland.attachment.config;

import java.util.Arrays;
import java.util.List;

/**
 * 常量池
 */
public class StaticValue {
    
    public static final String SOLRCLOUD_SERVER_FILE = "/config/solrCloudServer.properties";
    
    public static final String SYSTEMGLOBALS_FILE = "/config/SystemGlobals.properties";
    
    public static String CLASS_PATH = "Resouce2017_WEBROOT_PATH";
    
    public static String APP_ROOT = "appRoot";
    
    public static String PATH_KEY_FOR_UPLOAD = "Path4Upload";
    public static String PATH_KEY_FOR_DOWNLOAD = "Path4Download";
    public static String PATH_KEY_FOR_PREVIEW = "Path4Preview";
    public static String PATH_KEY_FOR_PREVIEW_WEBOFFICE = "Path4PreviewWeboffice";
    public static String PATH_KEY_FOR_DOCUMENT_MERGE = "Path4DocumentMerge";
    public static String PATH_KEY_FOR_TMP = "Path4Tmp";
    
    public static String PATH_VALUE_FOR_UPLOAD = "/files/uploadFile";
    public static String PATH_VALUE_FOR_DOWNLOAD = "/files/downloadFile";
    public static String PATH_VALUE_FOR_PREVIEW = "/files/previewFile";
    public static String PATH_VALUE_FOR_PREVIEW_WEBOFFICE = "/files/previewFile/weboffice";
    public static String PATH_VALUE_FOR_DOCUMENT_MERGE = "/files/mergeFile";
    public static String PATH_VALUE_FOR_TMP = "/files/tmp";
    
    public static String SESSION_USER = "Resouce2017_user";
    
    public static String SESSION_PERMISSIONS = "Resouce2017_permissions";
    
    public static String SESSION_SOLR_EXIST = "Resouce2017_SOLR_EXIST";
    
    public static final Long CHECK_TIMEOUT_INTERVAL = 5 * 60 * 1000L;
    
    public static final Long CHECK_TIMEOUT_DATE = 15 * 60 * 1000L;
    
    public static final String DETELED = "1";
    
    public static final String NOT_DELETED = "0";
    
    public static final String SHARE = "1";
    
    public static final String NOT_SHARE = "0";
    
    public static final String FTP = "1";
    
    public static final String SHARED_FOLDER = "2";
    
    public static final String FILE_STATUS_NEW = "NEW";
    public static final String FILE_STATUS_OLD = "OLD";
    public static final String FILE_STATUS_NORMAL = "";
    
    /*
     * 所有文件都支持上传
     * 
     * 不是所有文件都支持预览
     * 支持预览的文件有OFFICE_FILE/TEXT_FILE/PDF_FILE/IMG_FILE
     * 其中OFFICE_FILE会被转换成pdf文件然后将文件流写入到页面
     */
    //用于判断文件类型的常量
    //(注意:这里配置的文件类型在上传时会读取内容存入索引,其余文件类型只把文件名存入索引)
    //public static final List<String> OFFICE_FILE = Arrays.asList(new String[] {".doc", ".docx", ".ppt", ".pptx", ".rtf"});
    public static final List<String> OFFICE_FILE = Arrays.asList(".doc", ".docx", ".ppt", ".pptx", ".rtf");
    
    public static final List<String> EXCEL_FILE = Arrays.asList(".xls", ".xlsx", ".xlsm");
    
    public static final List<String> WORD_FILE = Arrays.asList(".doc", ".docx", ".docm");
    
    //(注意:这里配置的文件类型在上传时会读取内容存入索引,其余文件类型只把文件名存入索引)
    public static final List<String> TEXT_FILE = Arrays.asList(".txt", ".log", ".xml", ".html", ".csv");
    
    public static final List<String> PDF_FILE = Arrays.asList(".pdf");
    
    public static final List<String> IMG_FILE = Arrays.asList(".bmp", ".jpg", ".jpeg", ".gif", ".png");
    
//    public static final List<String> XML_FILE = Arrays.asList(new String[] {".html", ".xml"});
//    public static final List<String> TIF_FILE = Arrays.asList(new String[] {".tif", ".tiff"});
    
}